package com.android.waterdetection.utils;

import com.android.waterdetection.bean.CommonBean;
import com.android.waterdetection.bean.TokenBean;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface OrderService {

    /**
     * 获取用户Token
     */
    @POST("v3/auth/tokens")
    Call<Object> userToken(@Body RequestBody requestBody);

    /**
     * 创建设备命令
     */
    @FormUrlEncoded
    @POST("v5/iot/{project_id}/devices/{device_id}/async-commands")
    Call<CommonBean> createCommon(@Path("project_id") String projectId , @Path("device_id") String deviceId , @Field("async-commands") String commands);

    //鉴权
    @POST("iocm/app/sec/v1.1.0/login")
    @FormUrlEncoded
    Call<TokenBean> getToKen(@Field("appId") String appId, @Field("secret") String secret);

}
